<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<jsp:useBean id="today" class="java.util.Date" />

<c:import url="/view/admin/include/header/adminHeader.jsp"></c:import>
    <!-- 컨텐츠 부분 -->
	<div id="container">
    	<!-- 왼쪽 메뉴 부분 -->
    	<c:import url="/view/admin/include/left/adminLeft.jsp"></c:import>
        <!-- 왼쪽 메뉴 부분 -->
        <!-- 오른쪽 내용 부분 -->
        <input type="hidden" name="board_code" id="board_code" value="${boardView.board_code }"/>
        <dl>
        	<dd class="path">
        	홈 > 게시판 관리 > 
        		<span class="path_b">
        			<s:if test="%{boardBean.board_code.equals('BD100')}" >공지사항</s:if>
        			<s:if test="%{boardBean.board_code.equals('BD201')}" >윤리경영 Q&A</s:if>
        			<s:if test="%{boardBean.board_code.equals('BD202')}" >준법지원 Q&A</s:if>
        			<s:if test="%{boardBean.board_code.equals('BD203')}" >공정거래 Q&A</s:if>
        			<s:if test="%{boardBean.board_code.equals('BD204')}" >업무지원 Q&A</s:if>
        			<s:if test="%{boardBean.board_code.equals('BD205')}" >법률자문 Q&A</s:if>
        			<s:if test="%{boardBean.board_code.equals('BD206')}" >소송개시 Q&A</s:if>
        			<s:if test="%{boardBean.board_code.equals('BD301')}" >윤리경영 자료실</s:if>
        			<s:if test="%{boardBean.board_code.equals('BD302')}" >준법지원 자료실</s:if>
        			<s:if test="%{boardBean.board_code.equals('BD303')}" >공정거래 자료실</s:if>
        			<s:if test="%{boardBean.board_code.equals('BD304')}" >업무지원 자료실</s:if>
        			<s:if test="%{boardBean.board_code.equals('BD400')}" >사이버제보 </s:if>
        		</span>
        	</dd>
        </dl>
        <dl class="content">
            <dd class="">
            	<table cellspacing="0" cellpadding="0" summary="" >
                	<caption></caption>
                    	 <colgroup>
                          <col width="8%;"/>
                          <col width="55%;"/>
                          <col width="9%;"/>
                          <col width="28%"/>
                         </colgroup>
                    <tbody>
                    	<tr>
                        	<th scope="rows">제목</th>
                            <td colspan="3" class="table_txt_left f_blue " colspan="2">${boardView.title}</td>
                        </tr>
                        <tr>
                        	<th scope="rows">글쓴이</th>
                            <td class="table_txt_left">${boardView.mem_name }</td>
                            <th scope="rows">조회수</th>
                            <td class="table_txt_left">${boardView.read_count}</td>
                        </tr>
                        <tr>
                        	<th scope="rows" class="padding30">글내용</th>
                            <td class="table_txt_left padding30" colspan="3">${boardView.content }</td>
                        </tr> 
                        <tr>
                        	<th scope="rows" class="table_td_bottom">첨부파일</th>
                            <td class="table_txt_left table_td_bottom" colspan="3">
                            <p>
                            	<s:if test="%{fileView.file_name1 != null}">
                            		<a href="/board/fileDownload.hcom?board_seq=${boardView.board_seq }&save_type=board&attach_seq=${fileView.attach_seq1}">${fileView.file_name1 }</a>
                            	</s:if>
                            	<s:else>파일없음</s:else>
                            	</p>
                            	<p>
                            	<s:if test="%{fileView.file_name2 != null}">
                            		<a href="/board/fileDownload.hcom?board_seq=${boardView.board_seq }&save_type=board&attach_seq=${fileView.attach_seq2}">${fileView.file_name2 }</a>
                            	</s:if>
                            	
                            	<p>
                            	</p>
                            	<p>
                            	<s:if test="%{fileView.file_name3 != null}">
                            		<a href="/board/fileDownload.hcom?board_seq=${boardView.board_seq }&save_type=board&attach_seq=${fileView.attach_seq3}">${fileView.file_name3 }</a>
                            	</s:if>
                            	
                            	</p>
                            </td>
                        </tr>                
                    </tbody>
                 </table>
            </dd>
            <dd class="btn_right">
            	<input type="button" id="btnUpdate" value="수정" class="input_btn_s b" />
            	<input type="button" id="btnDel" value="삭제" class="input_btn_s b" />
            	<input type="button" id="btnList" value="목록" class="input_btn_s b" />
            </dd>
        </dl>
        <!-- 오른쪽 내용 부분 -->
    </div>
    <!-- 컨텐츠 부분 -->
<c:import url="/view/admin/include/footer/adminFooter.jsp"></c:import>
<script type="text/javascript" src="/js/portal/board.js"></script>
<script type="text/javascript">
	$().ready(function(){
		$("#btnList").click(function(){
			location.href="/admin/boardList.hcom?board_code="+$("#board_code").val();
		});
		$("#btnDel").click(function(){
			if(confirm("선택한 게시물을 삭제하시겠습니까?")){
				location.href="/admin/deleteBoard.hcom?board_seq=${boardView.board_seq }&board_code=${boardView.board_code}";	
			}
		});
		$("#btnUpdate").click(function(){
			location.href="/admin/boardModifyForm.hcom?board_seq=${boardView.board_seq }&board_code=${boardView.board_code}&save_type=board";	
		});					
	});
</script>